﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DLV.Utilities;

namespace DLV.Data.Entities
{
    public class TourFullController
    {
        public int InsertTourFull(TourFullInfo info)
        {
            return SQL.InsertTourFull(info.TourId, info.TourPackageId, info.CreatedBy, info.CreatedDate, info.UpdatedBy, info.UpdatedDate, info.Status, info.DateQuantity);
        }
        public void UpdateTourFull(TourFullInfo info)
        {
            SQL.UpdateTourFull(info.TourFullId, info.TourId, info.TourPackageId, info.CreatedBy, info.CreatedDate, info.UpdatedBy, info.UpdatedDate, info.Status, info.DateQuantity);
        }
        public void DeleteTourFull(TourFullInfo info)
        {
            DeleteTourFull(info.TourFullId);
        }
        public void DeleteTourFull(int tourFullId)
        {
            SQL.DeleteTourFull(tourFullId);
        }
        public TourFullInfo GetTourFull(int tourFullId)
        {
            return CBO.FillObject<TourFullInfo>(SQL.GetTourFull(tourFullId));
        }
        public List<TourFullInfo> ListTourFull()
        {
            return CBO.FillCollection<TourFullInfo>(SQL.ListTourFull());
        }
        public DataTable SelectTourFull()
        {
            return CBO.ConvertToDataTable(ListTourFull(), typeof(TourFullInfo));
        }
        public List<TourFullInfo> GetTourFullByTour(int tourId)
        {
            return CBO.FillCollection<TourFullInfo>(SQL.GetTourFullByTour(tourId));
        }
    }
}
